
import { message } from 'antd'

const MessageBox = () => {
    const [messageApi, contextHolder] = message.useMessage();
    messageApi
      .open({
        type: 'loading',
        content: 'Action in progress..',
        duration: 2.5,
      })
      .then(() => message.success('Loading finished', 2.5))
      .then(() => message.info('Loading finished', 2.5));
    return (
        {contextHolder}
    )
}

export {
    MessageBox
}